#include "udp_client.hpp"

#include <memory>

void Usage(const char *proc)
{
    printf("Usage: %s server_ip server_port\n\n", proc);
}

int main(int argc, char *argv[])
{
    if (argc != 3)
    {
        Usage(argv[0]);
        return 1;
    }
    std::string serverip = argv[1];
    uint16_t serverport = atoi(argv[2]);
    std::unique_ptr<UdpClient> pucli(new UdpClient(serverip, serverport));
    pucli->InitClient();
    pucli->Run();
    return 0;
}